export default (config) => {
  return {
    series: [
      {
        type: 'gauge',
        radius: '70%',
        center: ['50%', '50%'],
        startAngle: 180,
        endAngle: -180,
        min: config.min,
        max: config.max,
        splitNumber: 10,
        progress: {
          show: true
        },
        pointer: {
          show: false
        },
        axisTick: {
          splitNumber: 10,
          lineStyle: {
            width: 2,
            color: '#999'
          }
        },
        splitLine: {
          lineStyle: {
            width: 3,
            color: '#999'
          }
        },
        axisLabel: {
          color: '#999',
          fontStyle: 'italic',
          formatter: function (value) {
            if (value === config.max) {
              return ''
            }
            return value + ''
          }
        },
        detail: {
          valueAnimation: true,
          offsetCenter: [0, 0],
          fontWeight: 'bolder',
          formatter: '{value} MPa\n压力',
          color: 'inherit'
        }
      },
      {
        type: 'gauge',
        radius: '70%',
        center: ['50%', '50%'],
        startAngle: 180,
        endAngle: -180,
        min: config.min,
        max: config.max,
        progress: {
          show: true
        },
        pointer: {
          show: false
        },
        axisLine: {
          show: false
        },
        axisTick: {
          show: false
        },
        splitLine: {
          show: false
        },
        axisLabel: {
          show: false
        },
        detail: {
          show: false
        }
      }
    ]
  }
}
